﻿using System;

namespace DBMock
{
    /// <summary>
    /// 策略特性
    /// </summary>
    [AttributeUsage(AttributeTargets.Property)]
    public class StrategyAttribute : Attribute
    {
        /// <summary>
        /// 策略
        /// </summary>
        public Strategy Strategy { get; set; }

        /// <summary>
        /// 初始化策略特性
        /// </summary>
        /// <param name="name">策略名称</param>
        public StrategyAttribute(string name)
        {
            Strategy = new Strategy(name);
        }
    }
}
